<template>
    <div class="singer-album">
        <!-- 切换显示模式的按钮 -->
        <div class="btn">
            <el-tooltip  effect="dark" content="大图模式" placement="left">
                <span class="iconfont icon-card" :class="{active:isShowTable}" @click="showTable"></span>
            </el-tooltip>
            <el-tooltip  effect="dark" content="列表模式" placement="right">
                <span class="iconfont icon-biaogebeifen" :class="{active:isShowList}" @click="showList"></span>
            </el-tooltip>
        </div>
        <!-- 显示专辑 - 列表-->
        <Albumlist :albumlist="albumlist" v-if="isShowList"/>
        <!-- 显示专辑 - table -->
        <AlbumTable :albumlist="albumlist"  v-if="isShowTable"/>
    </div>
</template>
<script>
import Albumlist from "@/components/content/albumlist/Albumlist.vue";
import AlbumTable from "@/components/content/albumlist/AlbumTable.vue";
export default {
    name: "",
    components: { Albumlist, AlbumTable },
    props: {
        albumlist: {
            type: Array,
            default() {
                return [];
            }
        }
    },
    data() {
        return {
            isShowList: false,
            isShowTable: true //专辑表格显示
        };
    },
    created() {
    },
    methods: {
        showList() {
            this.isShowList = true;
            this.isShowTable = false;
        },
        showTable() {
            this.isShowTable = true;
            this.isShowList = false;
        }
    },
    
}
</script>
<style lang="less" scoped>
    .btn{
        cursor: pointer;
        margin-left: 10px;
        margin-top: 10px;
        span{
            padding-left: 10px;
        }
        .iconfont{
            font-size: 22px;
        }
        .active{
            color: var(--themeColor);
        }
    }
</style>